# Dockerizing Redis: Dockerfile for building Redis images
#
FROM xmlwch/centos:7.1
MAINTAINER xmlwch <xmlwch@126.com>

# Install Redis
RUN \
    wget http://download.redis.io/releases/redis-3.2.8.tar.gz && tar xzf redis-3.2.8.tar.gz && \
    cd redis-3.2.8 && yum -y install tcl && make && make install && \
    mkdir -p /etc/redis/ && \
    yum clean all && \
    cp redis.conf /etc/redis/redis.conf
RUN sed -i 's/bind 127.0.0.1/bind 0.0.0.0/' /etc/redis/redis.conf

ADD supervisor_redis.conf /etc/supervisor.conf.d/redis.conf

EXPOSE 6379

ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
